import { createRouter, createWebHashHistory, createWebHistory } from "vue-router";
import Home from "../views/Home.vue";
import Login from "../views/Login.vue";

const routes = [
  {
    path: "",
    redirect: "/Login",
    component: Login,
    children: [],
    meta: { show: false }
  },
  {
    path: "/Login",
    name: "Login",
    component: Login,
    meta: { title: "登录", show: false },
    children: []
  },
  {
    path: "/search",
    name: "search",
    component: () => import("../views/search.vue"),
    meta: { title: "查询", show: false },
    children: []
  },
  {
    path: "/about",
    name: "about",
    component: () => import("../views/About.vue"),
    meta: { title: "查询", show: false },
    children: []
  }
];

const router = createRouter({
  history: createWebHashHistory(),
  routes
});

export default router;
